<?
if($emaily){
$dotaz = "select email from ucast";
$uc = mysql_query($dotaz);
$dotaz = "select email from skupiny";
$sk = mysql_query($dotaz);

for($i=0;$i<mysql_num_rows($uc);$i++){
    $row = mysql_fetch_row($uc);
    if(!empty($row[0]))
        echo "$row[0], ";
}

for($i=0;$i<mysql_num_rows($sk);$i++){
    $row = mysql_fetch_row($sk);
    if(!empty($row[0]))
        echo "$row[0], ";
}

}
 ?>
